<?php
/**
 * @link https://gitee.com/toshcn/yii2-oauth2-server
 * @copyright Copyright (c) 2018 len168.com
 * @license https://gitee.com/toshcn/yii2-oauth2-server/blob/master/LICENSE
 */

namespace toshcn\yii2\oauth2server\models;

use Yii;

/**
 * This is the model class for table "{{%oauth_scopes}}".
 *
 * @property string $scope
 * @property int $is_default
 */
class OauthScopes extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%oauth_scopes}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['scope', 'is_default'], 'required'],
            [['is_default'], 'integer'],
            [['scope'], 'string', 'max' => 2000],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'scope' => Yii::t('OauthScopes', 'Scope'),
            'is_default' => Yii::t('OauthScopes', 'Is Default'),
        ];
    }
}
